import request from '@/utils/request'

export function login(params) {
    return request({
        url: '/user/login',
        method: 'post',
        params: params
    })
}

export function register(params) {
    return request({
        url: '/mch/register',
        method: 'post',
        params: params
    })
}

export function getInfo(token) {
    return request({
        url: '/sys/user/getUserInfo',
        method: 'get',
        params: { token }
    })
}

export function modifyPwd(params) {
    return request({
        url: '/user/modifyPwd',
        method: 'post',
        params: params
    })
}


export function resetPwd(params) {
    return request({
        url: '/user/resetPwd',
        method: 'post',
        params: params
    })
}

export function logout() {
    return request({
        url: '/user/logout',
        method: 'post'
    })
}

export function sendMsg(params) {
    return request({
        url: '/user/sendMsg',
        method: 'post',
        params: params
    })
}

export function checkUserExists(params) {
    return request({
        url: '/user/checkUserExists',
        method: 'get',
        params: params
    })
}

export function checkMsg(params) {
    return request({
        url: '/user/checkMsg',
        method: 'get',
        params: params
    })
}

export function resetPassword(params) {
    return request({
        url: 'sys/user/resetPassword',
        method: 'post',
        params: params
    })
}

